﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Web.Caching;

namespace ASBCC.Business
{
    class WebCacheFactory
    {
        //public static IWebCache GetWebCacheRealtime()
        //{
        //    string connectionString = ConfigurationManager.AppSettings["ConnectionString"];
        //    return new SqlDependencyWebCache(connectionString);
        //}

        //public static IWebCache GetWebCache(CacheCategory cacheCategory)
        //{
        //    switch (cacheCategory)
        //    {
        //        case CacheCategory.Realtime:
        //            return GetWebCacheRealtime();
        //        case CacheCategory.PerHour:
        //            return new CustomDependencyWebCache(null, System.Web.Caching.Cache.NoAbsoluteExpiration, new TimeSpan(1, 0, 0), CacheItemPriority.Default, null);
        //        case CacheCategory.PerTwoHours:
        //            return new CustomDependencyWebCache(null, System.Web.Caching.Cache.NoAbsoluteExpiration, new TimeSpan(2, 0, 0), CacheItemPriority.Default, null);
        //        case CacheCategory.PerDay:
        //            return new CustomDependencyWebCache(null, System.Web.Caching.Cache.NoAbsoluteExpiration, new TimeSpan(1, 0, 0, 0), CacheItemPriority.Default, null);
        //        default:
        //            return null;
        //    }
        //}
    }
}
